<div class="row m-n">
    <div class="crumbs-bar">
        <div yb-crumbs></div>
    </div>
    <div tabset type="tab">
        <div tab heading="邮政物流计价规则" ng-click="changeTab(0)">
            <div class="row wrapper-y-sm">
                <div class="operate-bar col-xs-4 font-0">
                    <button class="btn btn-operate m-r-sm" ng-click="addData()">新增</button>
                </div>
                <div class="search-bar wrapper-none col-xs-8">
                    <div class="btn-group m-l-xs pull-right">
                        <button type="button" class="btn btn-default base-color" ng-click="search()" title="刷新">
                            <i class="yb-icon ico-refresh"></i>
                        </button>
                        <button type="button" class="btn btn-default base-color" title="配置表格列"
                            ng-click="switchToolbar('ColConfig');">
                            <i class="yb-icon ico-set"></i>
                        </button>
                        <div class="btn btn-default base-color">
                            <div title="导入" ng-click="importData()">
                                <i class="yb-icon ico-import-o"></i>
                            </div>
                        </div>
                        <div class="btn btn-default base-color">
                            <div title="导出" yb-download download-url="exportParam.allUrl" download-param="condition" download-duration="3" is-ajax="true">
                                <i class="yb-icon ico-export-o"></i>
                            </div>
                        </div>
                    </div>
                    <button class="btn-advance pull-right m-l-xs" ng-click="switchToolbar('AdvanceSearch')">高级搜索</button>
                    <div class="input-group pull-right clearfix" ng-if="isZHJCH">
                        <input type="text" ng-model="condition.province" class="form-control txt-search" placeholder="省份">
                        <span class="input-group-addon cursor-pointer" ng-click="search(1)">搜索</span>
                    </div>
                </div>
            </div>
            <div yb-advance-search show-toolbar="toolbarConfig.showAdvanceSearch" search-data="search(1)" reset-data="reset()">
                <div class="advance-search m-t-sm">
                    <div class="form-group clearfix">
                        <label class="control-label"><span>省份</span>：</label>
                        <input type="text" ng-model="condition.province" class="form-control">
                    </div>
                </div>
            </div>
            <div yb-col-config show-toolbar="toolbarConfig.showColConfig" ng-model="tableConfig" col-fixed="true" set-tb-style="setFixedWidth()"></div>
            <div class="main-area">
                <div yb-table-fixed class="table-fixed-wrap fix-left" ele-count="4" scroll-area="right">
                    <div class="th-fixed">
                        <table class="table-fixed border-none" width="{{tableConfig.fixedWidth}}">
                            <thead>
                                <tr>
                                    <th ng-repeat="itemCol in tableConfig.tableCol track by $index"
                                        width="{{itemCol.width}}" ng-show="!!itemCol.isShow && !!itemCol.isFixed">
                                        <div yb-thead-operate ng-model="itemCol" target-width="tableConfig.fixedWidth"
                                            fixed-width="tbStyle.billFixedWidth"></div>
                                    </th>
                                </tr>
                            </thead>
                        </table>
                    </div>
                    <div class="th-scroll-x" ng-style="tbStyle.billFixedWidth">
                        <table class="table-fixed border-none" width="{{tableConfig.scrollWidth}}">
                            <thead>
                                <tr>
                                    <th ng-repeat="itemCol in tableConfig.tableCol track by $index"
                                        width="{{itemCol.width}}" ng-show="!!itemCol.isShow && !itemCol.isFixed">
                                        <div yb-thead-operate ng-model="itemCol" target-width="tableConfig.scrollWidth">
                                        </div>
                                    </th>
                                </tr>
                            </thead>
                        </table>
                    </div>
                    <div class="td-scroll-y" ng-show="dataList.length > 0">
                        <table class="table-fixed border-none" width="{{tableConfig.fixedWidth}}">
                            <tbody>
                                <tr ng-repeat="item in dataList track by $index" ng-click="selectRow($index)"
                                    ng-class="{'row-selected': $index === markInfo.curRow}">
                                    <td class="spill-dots" ng-repeat="itemCol in tableConfig.tableCol track by $index"
                                        width="{{itemCol.width}}" ng-show="!!itemCol.isShow && !!itemCol.isFixed"
                                        title="{{item[itemCol.dataField]}}">
                                        <div ng-switch="itemCol.type">
                                            <div ng-switch-when="operate">
                                                <button type="button" class="btn btn-operate m-r-xs"
                                                    ng-click="editData(item)">编辑</button>
                                                <button type="button" class="btn btn-operate m-r-xs"
                                                    ng-click="delData(item)">删除</button>
                                            </div>
                                            <div ng-switch-default>
                                                <span>{{item[itemCol.dataField]}}</span>
                                            </div>
                                        </div>
                                    </td>
                                </tr>
                            </tbody>
                        </table>
                    </div>
                    <div class="td-scroll" ng-show="dataList.length > 0" ng-style="tbStyle.billFixedWidth">
                        <table class="table-fixed border-none" width="{{tableConfig.scrollWidth}}">
                            <tbody>
                                <tr ng-repeat="item in dataList track by $index" ng-click="selectRow($index)"
                                    ng-class="{'row-selected': $index === markInfo.curRow}">
                                    <td class="spill-dots" ng-repeat="itemCol in tableConfig.tableCol track by $index"
                                        width="{{itemCol.width}}" ng-show="!!itemCol.isShow && !itemCol.isFixed"
                                        title="{{item[itemCol.dataField]}}">
                                        <div class="spill-dots">
                                            {{item[itemCol.dataField]}}
                                        </div>
                                    </td>
                                </tr>
                            </tbody>
                        </table>
                    </div>
                    <div class="no-data w-full text-center p-t" ng-show="dataList.length === 0">暂时没有数据</div>
                </div>
            </div>
            <div class="bottom-area page-bar wrapper-y-sm clearfix">
                <div yb-page-info ng-model="pageInfo" yb-refresh="search()"></div>
            </div>
        </div>
        <div tab heading="{{tabFlag.name}}" active="activeFlag[1]" ng-if="activeFlag[1]">
            <div class="main-area d-t-35 d-b-60">
                <form name="form" class="main-wrap form-horizontal single-col p-t clearfix" novalidate>
                    <div class="form-group">
                        <label class="col-xs-3 control-label"><i>*</i>省份编码：</label>
                        <div class="col-xs-5 wrapper-none">
                            <input type="text" name="provinceCode" class="form-control" ng-model="detailInfo.provinceCode" required yb-focus>
                        </div>
                        <div class="col-xs-4 msg-block"
                            ng-show="form.provinceCode.$dirty || (form.provinceCode.$invalid && submitted)">
                            <div class="error-msg" ng-if="form.provinceCode.$error.required && !form.provinceCode.focused">
                                <i class="yb-icon ico-times-circular"></i>必填项，请填写
                            </div>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-xs-3 control-label"><i>*</i>省份：</label>
                        <div class="col-xs-5 wrapper-none">
                            <input type="text" name="province" class="form-control" ng-model="detailInfo.province" required yb-focus>
                        </div>
                        <div class="col-xs-4 msg-block"
                            ng-show="form.province.$dirty || (form.province.$invalid && submitted)">
                            <div class="error-msg" ng-if="form.province.$error.required && !form.province.focused">
                                <i class="yb-icon ico-times-circular"></i>必填项，请填写
                            </div>
                        </div>
                    </div>

                    <div class="form-group">
                        <label class="col-xs-3 control-label">首重：</label>
                        <div class="col-xs-5 wrapper-none">
                            <input type="text" ng-model="detailInfo.firstWeight" class="form-control"
                                yb-number-input disable-decimal="false" decimal-places="2" max="9999999.99">
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-xs-3 control-label">首重价：</label>
                        <div class="col-xs-5 wrapper-none">
                            <input type="text" ng-model="detailInfo.firstWeightPrice" class="form-control"
                                yb-number-input disable-decimal="false" decimal-places="2" max="9999999.99">
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-xs-3 control-label">续重：</label>
                        <div class="col-xs-5 wrapper-none">
                            <input type="text" ng-model="detailInfo.xuWeight" class="form-control"
                                yb-number-input disable-decimal="false" decimal-places="2" max="9999999.99">
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-xs-3 control-label">续重价：</label>
                        <div class="col-xs-5 wrapper-none">
                            <input type="text" ng-model="detailInfo.xuWeightPrice" class="form-control"
                                yb-number-input disable-decimal="false" decimal-places="2" max="9999999.99">
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-xs-3 control-label">协议45-60公斤：</label>
                        <div class="col-xs-5 wrapper-none">
                            <input type="text" ng-model="detailInfo.weight1" class="form-control"
                                yb-number-input disable-decimal="false" decimal-places="2" max="9999999.99">
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-xs-3 control-label">协议60公斤上：</label>
                        <div class="col-xs-5 wrapper-none">
                            <input type="text" ng-model="detailInfo.weight2" class="form-control"
                                yb-number-input disable-decimal="false" decimal-places="2" max="9999999.99">
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-xs-3 control-label">协议100公斤上：</label>
                        <div class="col-xs-5 wrapper-none">
                            <input type="text" ng-model="detailInfo.weight3" class="form-control"
                                yb-number-input disable-decimal="false" decimal-places="2" max="9999999.99">
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-xs-3 control-label">协议200公斤上：</label>
                        <div class="col-xs-5 wrapper-none">
                            <input type="text" ng-model="detailInfo.weight4" class="form-control"
                                yb-number-input disable-decimal="false" decimal-places="2" max="9999999.99">
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-xs-3 control-label">协议300公斤上：</label>
                        <div class="col-xs-5 wrapper-none">
                            <input type="text" ng-model="detailInfo.weight5" class="form-control"
                                yb-number-input disable-decimal="false" decimal-places="2" max="9999999.99">
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-xs-3 control-label">协议400公斤上：</label>
                        <div class="col-xs-5 wrapper-none">
                            <input type="text" ng-model="detailInfo.weight6" class="form-control"
                                yb-number-input disable-decimal="false" decimal-places="2" max="9999999.99">
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-xs-3 control-label">协议500公斤上：</label>
                        <div class="col-xs-5 wrapper-none">
                            <input type="text" ng-model="detailInfo.weight7" class="form-control"
                                yb-number-input disable-decimal="false" decimal-places="2" max="9999999.99">
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-xs-3 control-label">协议600公斤上：</label>
                        <div class="col-xs-5 wrapper-none">
                            <input type="text" ng-model="detailInfo.weight8" class="form-control"
                                yb-number-input disable-decimal="false" decimal-places="2" max="9999999.99">
                        </div>
                    </div>

                    <div class="form-group save-bar m-t-md">
                        <label class="col-xs-3 control-label"></label>
                        <div class="col-xs-5 wrapper-none">
                            <button type="button" class="btn btn-primary m-r-sm" ng-click="saveData(form.$valid)">保存</button>
                            <button type="button" class="btn btn-default" ng-click="cancel()">取消</button>
                        </div>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>